<div>
    <h2>
        <span jhiTranslate="studyng6App.bookBasic.home.title">Book Basics</span>
        <button *jhiHasAnyAuthority="'ROLE_ADMIN'" class="btn btn-primary float-right jh-create-entity create-book-basic" [routerLink]="['/', { outlets: { popup: ['book-basic-new'] } }]">
            <span class="fa fa-plus"></span>
            <span  jhiTranslate="studyng6App.bookBasic.home.createLabel">
            Create new Book Basic
            </span>
        </button>
    </h2>
    <jhi-alert></jhi-alert>
    <div class="row">
    </div>
    <br/>
    <div class="table-responsive" *ngIf="bookBasics">
        <table class="table table-striped">
            <thead>
            <tr jhiSort [(predicate)]="predicate" [(ascending)]="reverse" [callback]="transition.bind(this)">
            <th jhiSortBy="id"><span jhiTranslate="global.field.id">ID</span> <span class="fa fa-sort"></span></th>
            <th jhiSortBy="bookName"><span jhiTranslate="studyng6App.bookBasic.bookName">Book Name</span> <span class="fa fa-sort"></span></th>
            <th jhiSortBy="author"><span jhiTranslate="studyng6App.bookBasic.author">Author</span> <span class="fa fa-sort"></span></th>
            <th jhiSortBy="translator"><span jhiTranslate="studyng6App.bookBasic.translator">Translator</span> <span class="fa fa-sort"></span></th>
            <th jhiSortBy="press"><span jhiTranslate="studyng6App.bookBasic.press">Press</span> <span class="fa fa-sort"></span></th>
            <th jhiSortBy="foreignLanguageName"><span jhiTranslate="studyng6App.bookBasic.foreignLanguageName">Foreign Language Name</span> <span class="fa fa-sort"></span></th>
            <th jhiSortBy="paginalNumber"><span jhiTranslate="studyng6App.bookBasic.paginalNumber">Paginal Number</span> <span class="fa fa-sort"></span></th>
            <th jhiSortBy="language"><span jhiTranslate="studyng6App.bookBasic.language">Language</span> <span class="fa fa-sort"></span></th>
            <th jhiSortBy="folio"><span jhiTranslate="studyng6App.bookBasic.folio">Folio</span> <span class="fa fa-sort"></span></th>
            <th jhiSortBy="isbn"><span jhiTranslate="studyng6App.bookBasic.isbn">Isbn</span> <span class="fa fa-sort"></span></th>
            <th jhiSortBy="barCode"><span jhiTranslate="studyng6App.bookBasic.barCode">Bar Code</span> <span class="fa fa-sort"></span></th>
            <th jhiSortBy="bookSize"><span jhiTranslate="studyng6App.bookBasic.bookSize">Book Size</span> <span class="fa fa-sort"></span></th>
            <th jhiSortBy="brand"><span jhiTranslate="studyng6App.bookBasic.brand">Brand</span> <span class="fa fa-sort"></span></th>
            <th jhiSortBy="asin"><span jhiTranslate="studyng6App.bookBasic.asin">Asin</span> <span class="fa fa-sort"></span></th>
            <th jhiSortBy="pubDate"><span jhiTranslate="studyng6App.bookBasic.pubDate">Pub Date</span> <span class="fa fa-sort"></span></th>
            <th jhiSortBy="introduction"><span jhiTranslate="studyng6App.bookBasic.introduction">Introduction</span> <span class="fa fa-sort"></span></th>
            <th jhiSortBy="cover"><span jhiTranslate="studyng6App.bookBasic.cover">Cover</span> <span class="fa fa-sort"></span></th>
            <th jhiSortBy="perface"><span jhiTranslate="studyng6App.bookBasic.perface">Perface</span> <span class="fa fa-sort"></span></th>
            <th jhiSortBy="epilogue"><span jhiTranslate="studyng6App.bookBasic.epilogue">Epilogue</span> <span class="fa fa-sort"></span></th>
            <th jhiSortBy="price"><span jhiTranslate="studyng6App.bookBasic.price">Price</span> <span class="fa fa-sort"></span></th>
            <th jhiSortBy="bookTypeId.id"><span jhiTranslate="studyng6App.bookBasic.bookTypeId">Book Type Id</span> <span class="fa fa-sort"></span></th>
            <th jhiSortBy="authodId.id"><span jhiTranslate="studyng6App.bookBasic.authodId">Authod Id</span> <span class="fa fa-sort"></span></th>
            <th></th>
            </tr>
            </thead>
            <tbody>
            <tr *ngFor="let bookBasic of bookBasics ;trackBy: trackId">
                <td><a [routerLink]="['../book-basic', bookBasic.id ]">{{bookBasic.id}}</a></td>
                <td>{{bookBasic.bookName}}</td>
                <td>{{bookBasic.author}}</td>
                <td>{{bookBasic.translator}}</td>
                <td>{{bookBasic.press}}</td>
                <td>{{bookBasic.foreignLanguageName}}</td>
                <td>{{bookBasic.paginalNumber}}</td>
                <td>{{bookBasic.language}}</td>
                <td>{{bookBasic.folio}}</td>
                <td>{{bookBasic.isbn}}</td>
                <td>{{bookBasic.barCode}}</td>
                <td>{{bookBasic.bookSize}}</td>
                <td>{{bookBasic.brand}}</td>
                <td>{{bookBasic.asin}}</td>
                <td>{{bookBasic.pubDate | date:'medium'}}</td>
                <td>{{bookBasic.introduction}}</td>
                <td>
                    <a *ngIf="bookBasic.cover" (click)="openFile(bookBasic.coverContentType, bookBasic.cover)" jhiTranslate="entity.action.open">open</a>
                    <span *ngIf="bookBasic.cover">{{bookBasic.coverContentType}}, {{byteSize(bookBasic.cover)}}</span>
                </td>
                <td>{{bookBasic.perface}}</td>
                <td>{{bookBasic.epilogue}}</td>
                <td>{{bookBasic.price}}</td>
                <td>
                    <div *ngIf="bookBasic.bookTypeId">
                        <a [routerLink]="['../book-type', bookBasic.bookTypeId?.id ]" >{{bookBasic.bookTypeId?.id}}</a>
                    </div>
                </td>
                <td>
                    <div *ngIf="bookBasic.authodId">
                        <a [routerLink]="['../author', bookBasic.authodId?.id ]" >{{bookBasic.authodId?.id}}</a>
                    </div>
                </td>
                <td class="text-right">
                    <div class="btn-group flex-btn-group-container">
                        <button type="submit"
                                [routerLink]="['../book-basic', bookBasic.id ]"
                                class="btn btn-info btn-sm">
                            <span class="fa fa-eye"></span>
                            <span class="d-none d-md-inline" jhiTranslate="entity.action.view">View</span>
                        </button>
                        <button type="submit"
                                [routerLink]="['/', { outlets: { popup: 'book-basic/'+ bookBasic.id + '/edit'} }]"
                                replaceUrl="true"
                                queryParamsHandling="merge"
                                class="btn btn-primary btn-sm">
                            <span class="fa fa-pencil"></span>
                            <span class="d-none d-md-inline" jhiTranslate="entity.action.edit">Edit</span>
                        </button>
                        <button type="submit"
                                [routerLink]="['/', { outlets: { popup: 'book-basic/'+ bookBasic.id + '/delete'} }]"
                                replaceUrl="true"
                                queryParamsHandling="merge"
                                class="btn btn-danger btn-sm">
                            <span class="fa fa-remove"></span>
                            <span class="d-none d-md-inline" jhiTranslate="entity.action.delete">Delete</span>
                        </button>
                    </div>
                </td>
            </tr>
            </tbody>
        </table>
    </div>
    <div *ngIf="bookBasics && bookBasics.length">
        <div class="row justify-content-center">
            <jhi-item-count [page]="page" [total]="queryCount" [maxSize]="5" [itemsPerPage]="itemsPerPage"></jhi-item-count>
        </div>
        <div class="row justify-content-center">
            <ngb-pagination [collectionSize]="totalItems" [(page)]="page" [pageSize]="itemsPerPage" [maxSize]="5" [rotate]="true" [boundaryLinks]="true" (pageChange)="loadPage(page)"></ngb-pagination>
        </div>
    </div>
</div>
